package com.jsbs.iam.user.mapper;

import com.jsbs.iam.user.entity.IamButton;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface IamButtonMapper {
    int deleteByPrimaryKey(Long id);

    int insert(IamButton record);

    int insertSelective(IamButton record);

    IamButton selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(IamButton record);

    int updateByPrimaryKey(IamButton record);

    /**
     * 查询菜单编码
     * @param userCode
     * @return
     */
    List<String> getMenuCode (@Param("userCode")String userCode);

    /**
     * 查询应用下所有的菜单
     * @param applyCode
     * @return
     */
    List<IamButton> getButtonList (@Param("applyCode")String applyCode);

    /**
     * 功能描述：根据按钮编码查询数据
     * @param buttonCodeList
     * @return
     */
    List<IamButton> queryByButtonCode(@Param("buttonCodeList") List<String> buttonCodeList);

    /**
     * 功能描述：根据菜单编码获取按钮
     * @param menuCodeList
     * @return
     */
    List<IamButton> queryByMenuCode(@Param("menuCodeList") List<String> menuCodeList);

    /**
     * 功能描述：根据主键ID获取按钮列表
     * @param buttonIdList
     * @return
     */
    List<IamButton> queryButtonByIDs(@Param("buttonIdList") List<Long> buttonIdList);
}